package com.miplus.ccrm.core.service.voiceprint;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.miplus.ccrm.common.CmdResVo;
import com.miplus.ccrm.common.JSysUser;
import com.miplus.ccrm.core.controller.vo.file.UploadResVo;
import com.miplus.ccrm.core.controller.vo.voiceprint.*;
import com.miplus.ccrm.core.pojo.VoiceModelLibrary;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;

/**
* @author Yaohui
* @description 针对表【voice_model_library(客户语音模型库表)】的数据库操作Service
* @createDate 2025-03-01 14:09:33
*/
public interface VoiceModelLibraryService extends IService<VoiceModelLibrary> {

    IPage<CustomerModelPageResVo> customerModelPage(JSysUser user,CustomerModelPageReqVo reqVo);

    CustomerModelInfoResVo customerModelInfo(CustomerModelInfoReqVo reqVo);//客户语音模型详情
    CmdResVo trainModel(CustomerModelInfoReqVo reqVo);//语音模型训练
    int addCustomerModel(String customerId);//建立客户语音模型

    CmdResVo verifyModel(String id);//声纹比对

    // 声纹操作
    IPage<VoicePrintLibraryPageResVo> vpPage(VoicePrintLibraryPageReqVo reqVo);
    CmdResVo customerVoiceRegi(CustomerVoiceRegiReqVo reqVo);//客户注册声纹
    CmdResVo customerCompareRegi(CustomerVoiceRegiReqVo reqVo);//客户比对声纹上传
    CmdResVo vpDel(String id);//客户注册声纹

    void OnPlayFile(String id, HttpServletResponse response);
    UploadResVo doUpload(MultipartFile file);
}
